package com.usian.dao;

import com.usian.pojo.Dept;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface DeptMapper extends tk.mybatis.mapper.common.Mapper<Dept> {
@Insert("insert into dept values(null,#{dname},#{ctime})")
    void addDept(Dept dept);
@Select("select * from dept where id=#{id}")
    Dept findByDept(@Param("id") Integer id);
@Select("select * from dept")
    List<Dept> findAll();
}